<?php

session_start();
require_once 'MyDB.php';
$con = new MyDB();
$_orderBy = "IdRoom";

$query = $con->selectFrom("rooms", $columns = null, $where = null, $like = false, $orderby = null, $direction = "DESC", $limit = null, $offset = null);

$result = $query["result"];
if ($query["num"] > 0) {

    echo '<table class="principalHabitaciones">';
    echo " <thead ><tr><th>Habitación</th></tr> </thead >";
    foreach ($result as $row) {

        echo "<tr style='height: 42px;'><td>" . $row["Nombre"] . "</td></tr>";
    }
    echo '</table>';
}
?>
